package com.chen.service.impl;


import com.chen.dao.ContractDao;
import com.chen.model.Contract;
import com.chen.service.ContractService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("contractService")
public class ContractServiceImpl implements ContractService {

    @Resource
    private ContractDao contractDao;

    @Override
    public List<Contract> findAllContract(){
        return contractDao.findAllContract();
    }
    @Override
    public int addContract(Contract contract){
        return contractDao.addContract(contract);
    }

    @Override
    public Contract findContractById(Integer contract_id) {
        return contractDao.findContractById(contract_id);
    }

    @Override
    public int updateState(Contract contract) {
        return contractDao.updateState(contract);
    }

    @Override
    public int updateContract(Contract contract) {
        return contractDao.updateContract(contract);

    }
}
